package sanshi.contect.strategy;

public class Cat implements Comparable<Cat>{

    private double weight;
    private int age;

    @Override
    public int compareTo(Cat o) {
        if (this.weight < o.weight){
            return -1;
        }else if (this.weight > o.weight){
            return 1;
        }else if (this.age < o.age){
            return -1;
        }else if (this.age > o.age){
            return 1;
        }
        return 0;
    }
}
